package com.mashibing.service;

import com.mashibing.internalcommon.dto.PriceRule;
import com.mashibing.internalcommon.dto.ResponseResult;

public interface PriceRuleService {
    /**
     * 新增计价规则
     * @param priceRule
     * @return
     */
    ResponseResult add(PriceRule priceRule);

    /**
     * 修改计价规则
     * @param priceRule
     * @return
     */
    ResponseResult update(PriceRule priceRule);

    /**
     *查询最新计价规则
     * @param fareType
     * @return
     */
    ResponseResult<PriceRule> getNewestVersion(String fareType);

    /**
     * 判断规则是否最新
     * @param fareType
     * @param fareVersion
     * @return
     */
    ResponseResult<Boolean> isNew(String fareType, Integer fareVersion);

    /**
     * 判断该城市和对应车型的计价规则是否存在
     * @param priceRule
     * @return
     */
    ResponseResult<Boolean> ifExists(PriceRule priceRule);
}
